from Autotests.BaseTest import AirClientTestCase
from Autotests.LocalMachine.Pages.AirClient.OptionsPage.AdvancedTab import Language
from Autotests.LocalMachine.Pages.AirClient.OptionsPage.AdvancedTab import AdvancedTab


class OptionsAdvancedTest(AirClientTestCase):
    def test_SetAdvancedOptions(self):
        self.advancedTab = AdvancedTab()
        path = 'C:\\Users\\Public\\Documents\\'
        language = Language.german

        self.defaultSettings = self.advancedTab.getAdvancedSettings()
        self.advancedTab.setAdvancedSettings(language, path)
        newSettings = self.advancedTab.getAdvancedSettings()
        self.assertEqual(language, newSettings[0], "Language has been set incorrectly")
        self.assertEqual(path, newSettings[1], "Temp Directory has been set incorrectly")

    def tearDownImpl(self):
        self.advancedTab.setAdvancedSettings(*self.defaultSettings)

import unittest
if __name__ == "__main__":
    unittest.main()
